package org.example.domain.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.domain.entity.Domain;
import org.example.domain.mapper.DomainMapper;
import org.springframework.stereotype.Service;

@Service
public class DomainService {
    private final DomainMapper domainMapper;

    public DomainService(DomainMapper domainMapper) {
        this.domainMapper = domainMapper;
    }

    // 分页查询核心逻辑
    public IPage<Domain> getDomainPage(int pageNum, int pageSize) {
        Page<Domain> page = new Page<>(pageNum, pageSize);
        return domainMapper.selectDomainPage(page);
    }
}
